<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.org/ui">

    <ui:decorate template="/resources/template/modelo.xhtml">
        <ui:define name="centro">

            <h:form>

                <p:dataTable id="dataTable" var="a" value="#{anaisBean.anais}" paginator="true" rows="10"  >  
                    <f:facet name="header">  
                        Anais
                    </f:facet>  

                    <p:column >  
                        <f:facet name="header">  
                            <h:outputText value="Nome do Evento" />  
                        </f:facet>  
                        <h:outputText value="#{a.titulo}" />  
                    </p:column>  

                    <p:column>  
                        <f:facet name="header">  
                            <h:outputText value="País" />  
                        </f:facet>  
                        <h:outputText value="#{a.cidadePublicacao}" />  
                    </p:column>  

                    <p:column>  
                        <f:facet name="header">  
                            <h:outputText value="Uf" />  
                        </f:facet>  
                        <h:outputText value="#{a.ufPublicacao}" />  
                    </p:column>  

                    <p:column>  
                        <f:facet name="header">  
                            <h:outputText value="Cidade" />  
                        </f:facet>  
                        <h:outputText value="#{a.cidadePublicacao}" />  
                    </p:column>  
                    <p:column>  
                        <f:facet name="header">  
                            <h:outputText value="Data Início" />  
                        </f:facet>
                       
                        <h:outputText value="#{a.dataInicio}" >
                            <f:convertDateTime type="date" pattern="dd-MM-yyyy"/>
                        </h:outputText>
                            
                    </p:column>  
                    <p:column>  
                        <f:facet name="header">  
                            <h:outputText value="Data Fim" />  
                        </f:facet>
                        <h:outputText value="#{a.dataFim}" >
                            <f:convertDateTime type="date" pattern="dd-MM-yyyy"/>
                        </h:outputText>
                            
                    </p:column>  
                    <p:column >  
                        <f:facet name="header">  
                            <h:outputText value="Ações" />  
                        </f:facet>  
                        <div align="center">
                            <p:commandButton action="/cadastros/obras/anais/editar/editarAnais" actionListener="#{anaisBean.selecionar()}" value="Editar" ajax="false" />
                            <p:commandButton action="/cadastros/obras/anais/remover/removerAnais" actionListener="#{anaisBean.selecionar()}" value="Remover" ajax="false" />
                        </div>
                    </p:column>  
                </p:dataTable>  


            </h:form>


        </ui:define>
    </ui:decorate>
</html>